<?php if (!defined('THINK_PATH')) exit();?><h3><?php echo ($name); ?>表单</h3>

        <div class="m-panel ">
            <div class="panel-body">
            
        <form action="<?php echo U();?>" method="post" id="form" class="m-form m-form-horizontal">
        <fieldset>
          
        <div class="formitm">
            <label class="lab">名称</label>
            <div class="ipt">
                <input name="name" type="text"  class="form-element u-width-large  " id="name" value="<?php echo ($info["name"]); ?>" maxlength="200"  datatype="*" >
                <p class="help-block">当前表单的描述</p>
            </div>
        </div>
    
        <div class="formitm">
            <label class="lab">表名</label>
            <div class="ipt">
                <input name="table" type="text"  class="form-element u-width-large  " id="table" value="<?php echo ($info["table"]); ?>" maxlength="20"  datatype="s" errormsg="请不要包含特殊字符">
                <p class="help-block">数据库中的表名</p>
            </div>
        </div>
    
        <div class="formitm">
            <label class="lab">列表页</label>
            <div class="ipt">
                <label>
                      <input type="radio" name="show_list" id="show_list0" value="1"   <?php if(!isset($info['show_list'])){ $info['show_list']= "1"; } if(1 == $info['show_list']){ ?> checked="checked" <?php } ?> > <span>开启</span>
                    </label> <label>
                      <input type="radio" name="show_list" id="show_list1" value="0"   <?php if(!isset($info['show_list'])){ $info['show_list']= "1"; } if(0 == $info['show_list']){ ?> checked="checked" <?php } ?> > <span>关闭</span>
                    </label> 
                <p class="help-block">关闭后前台将不能查看列表分页内容</p>
            </div>
        </div>
    
        <div class="formitm">
            <label class="lab">详细页</label>
            <div class="ipt">
                <label>
                      <input type="radio" name="show_info" id="show_info0" value="1"   <?php if(!isset($info['show_info'])){ $info['show_info']= "1"; } if(1 == $info['show_info']){ ?> checked="checked" <?php } ?> > <span>开启</span>
                    </label> <label>
                      <input type="radio" name="show_info" id="show_info1" value="0"   <?php if(!isset($info['show_info'])){ $info['show_info']= "1"; } if(0 == $info['show_info']){ ?> checked="checked" <?php } ?> > <span>关闭</span>
                    </label> 
                <p class="help-block">关闭后前台将不能查看表单详细内容</p>
            </div>
        </div>
    
        <div class="formitm">
            <label class="lab">前台发布</label>
            <div class="ipt">
                <label>
                      <input type="radio" name="post_status" id="post_status0" value="1"   <?php if(!isset($info['post_status'])){ $info['post_status']= "1"; } if(1 == $info['post_status']){ ?> checked="checked" <?php } ?> > <span>开启</span>
                    </label> <label>
                      <input type="radio" name="post_status" id="post_status1" value="0"   <?php if(!isset($info['post_status'])){ $info['post_status']= "1"; } if(0 == $info['post_status']){ ?> checked="checked" <?php } ?> > <span>关闭</span>
                    </label> 
                <p class="help-block">关闭后将不能从前台提交表单</p>
            </div>
        </div>
    
        <div class="formitm">
            <label class="lab">提交成功后消息</label>
            <div class="ipt">
                <input name="post_msg" type="text"  class="form-element u-width-large  " id="post_msg" value="<?php echo ((isset($info["post_msg"]) && ($info["post_msg"] !== ""))?($info["post_msg"]):'表单提交成功！'); ?>" maxlength="20"  datatype="*" errormsg="请填写成功返回消息">
                <p class="help-block">表单提交成功后返回的消息</p>
            </div>
        </div>
    
        <div class="formitm">
            <label class="lab">成功后返回地址</label>
            <div class="ipt">
                <input name="post_return_url" type="text"  class="form-element u-width-large  " id="post_return_url" value="<?php echo ($info["post_return_url"]); ?>" maxlength="20"   >
                <p class="help-block">不填将返回表单列表页</p>
            </div>
        </div>
    
        <div class="formitm">
            <label class="lab">前台分页数</label>
            <div class="ipt">
                <input name="list_page" type="text"  class="form-element u-width-mini  " id="list_page" value="<?php echo ((isset($info["list_page"]) && ($info["list_page"] !== ""))?($info["list_page"]):'10'); ?>" maxlength="20"  datatype="n" errormsg="分页数只能为数字">
                <p class="help-block">前台列表的分页数</p>
            </div>
        </div>
    
        <div class="formitm">
            <label class="lab">前台列表条件</label>
            <div class="ipt">
                <input name="list_where" type="text"  class="form-element u-width-large  " id="list_where" value="<?php echo ($info["list_where"]); ?>" maxlength="20"   >
                <p class="help-block">标准SQL条件</p>
            </div>
        </div>
    
        <div class="formitm">
            <label class="lab">内容排序</label>
            <div class="ipt">
                <input name="list_order" type="text"  class="form-element u-width-large  " id="list_order" value="<?php echo ((isset($info["list_order"]) && ($info["list_order"] !== ""))?($info["list_order"]):'data_id desc'); ?>" maxlength="20"  datatype="*" errormsg="请输入排序信息">
                <p class="help-block">针对前后台列表的分页排序</p>
            </div>
        </div>
    
        <div class="formitm">
            <label class="lab">列表模板</label>
            <div class="ipt">
                <input name="tpl_list" type="text"  class="form-element u-width-medium  " id="tpl_list" value="<?php echo ((isset($info["tpl_list"]) && ($info["tpl_list"] !== ""))?($info["tpl_list"]):'form_list'); ?>" maxlength="20"  datatype="*" errormsg="请选择模板">
      
        <select class="form-element dux-assign " target="#tpl_list" id="" >
            <option value =" ">请选择</option>
            <?php if(is_array($tplList)): foreach($tplList as $key=>$vo): ?><option value="<?php echo ($vo["name"]); ?>"><?php echo ($vo["file"]); ?></option><?php endforeach; endif; ?>
        </select>
                <p class="help-block">前台表单列表所使用的模板</p>
            </div>
        </div>
    
        <div class="formitm">
            <label class="lab">详细模板</label>
            <div class="ipt">
                <input name="tpl_info" type="text"  class="form-element u-width-medium  " id="tpl_info" value="<?php echo ((isset($info["tpl_info"]) && ($info["tpl_info"] !== ""))?($info["tpl_info"]):'form_content'); ?>" maxlength="20"  datatype="*" errormsg="请选择模板">
      
        <select class="form-element dux-assign " target="#tpl_info" id="" >
            <option value =" ">请选择</option>
            <?php if(is_array($tplList)): foreach($tplList as $key=>$vo): ?><option value="<?php echo ($vo["name"]); ?>"><?php echo ($vo["file"]); ?></option><?php endforeach; endif; ?>
        </select>
                <p class="help-block">前台表单列表所使用的模板</p>
            </div>
        </div>
    
        <div class="formitm form-submit">
        <div class="ipt">
            <div class="tip" id="tips"></div>
            <button class="u-btn u-btn-success u-btn-large" type="submit" id="btn-submit">保存</button>
            <button class="u-btn u-btn-large" type="reset">重置</button>
        </div>
        </div>
    <input name="fieldset_id" type="hidden"  class="form-element u-width-large  " id="fieldset_id" value="<?php echo ($info["fieldset_id"]); ?>"    >
        </fieldset>
        </form>
            </div> </div>
<script>
Do.ready('base',function() {
	$('#form').duxForm();
});
</script>